<!DOCTYPE html>
<html>
    <head>
    	<title>Danh sách dự án</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url('resources');?>/css/admin/test.css">
        <link href="<?php echo base_url('resources');?>/jtable.2.3.1/themes/lightcolor/blue/jtable.css" rel="stylesheet" type="text/css" />
        <script src="<?php echo base_url('resources');?>/js/jquery-1.8.2.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url('resources');?>/jquery-ui-1.10.3/ui/jquery-ui.js" type="text/javascript"></script>
        <link href="<?php echo base_url('resources');?>/jquery-ui-1.10.3/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
        <script src="<?php echo base_url('resources');?>/jtable.2.3.1/jquery.jtable.js" type="text/javascript"></script>
        <script src="<?php echo base_url('resources');?>/jtable.2.3.1/jquery.jtable.min.js" type="text/javascript"></script>
    </head>
    
    <body>
        

        <div id="dsVaiTro"></div>
        <script type="text/javascript">
        
            //Prepare jTable
            $(document).ready(function () {
                $('#dsVaiTro').jtable({
                    title: 'Danh Sách Vai Trò:',
                    actions: {
                        listAction: '<?php echo base_url('admin/quanlyvaitro/hienThiDanhSachVaiTro'); ?>',
                        createAction: '<?php echo base_url('admin/quanlyvaitro/themVaiTro'); ?>',
                        updateAction: '<?php echo base_url('admin/quanlyvaitro/suaVaiTro'); ?>',
                        deleteAction: '<?php echo base_url('admin/quanlyvaitro/xoaVaiTro'); ?>'
                    },
                    fields: {
                        MaVaiTro: {
                            key: true,
                            title: 'Mã vai trò',
                            width: '40%'
                        },
                        TenVaiTro: {
                            title: 'Tên vai trò',
                            width: '50%'
                        }
                    }
                });
                
                //Load duan list from server
                $('#dsVaiTro').jtable('load');
            });

        </script>
        
        
    </body>
</html>